﻿<Window x:Class="GoogleCalendarView.MainView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Google Calendar Viewer" Height="556" Width="814"
        Icon="icons/Calendario.ico">
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Close"
                    Executed="CloseCommandHandler"
                    />
        <CommandBinding Command="ApplicationCommands.New"
                        Executed="NewUserCommandHandler"
                        />
        <CommandBinding Command="ApplicationCommands.Delete"
                        Executed="DeleteUserCommandHandler"
                        />
    </Window.CommandBindings>
    <DockPanel Height="Auto" Name="layoutPanel">
        <Menu Height="Auto" Name="mainMenu" Width="Auto" DockPanel.Dock="Top">
            <MenuItem Name="File" Header="File">
                <MenuItem Name="Export" Header="Export Calendar">
                    <MenuItem.Icon>
                        <Image Source="icons/Folder_Open.png" Height="16" Width="16"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Name="Backup" Header="Backup Database">
                    <MenuItem.Icon>
                        <Image Source="icons/EmptyDrive.png" Height="16" Width="16"/>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Name="Exit" Header="Exit Application" Command="ApplicationCommands.Close">
                    <MenuItem.Icon>
                        <Image Source="icons/delete.png" Height="16" Width="16"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <MenuItem Name="Calendar" Header="Google Calendar">
                <MenuItem Name="AddUser" Header="Add a new user" Command="ApplicationCommands.New">
                    <MenuItem.Icon>
                        <Image Source="icons/Users.png" Height="16" Width="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Name="DeleteUser" Header="Delete a user" Command="ApplicationCommands.Delete">
                    <MenuItem.Icon>
                        <Image Source="icons/Users.png" Height="16" Width="16" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Name="Synchronize" Header="Synchronize local and remote">
                    <MenuItem.Icon>
                        <Image Source="icons/Connection_Manager.png" Height="16" Width="16"/>
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
        </Menu>

        <StatusBar Height="28" Name="statusBar" Width="Auto" DockPanel.Dock="Bottom">
            <TextBlock Name="loggingBlock" Width="Auto" Text="This status bar shows some messages. Like a log." />
        </StatusBar>

        <Grid Height="Auto" Name="mainGrid" Width="Auto" >
            <Grid.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="Blue"></GradientStop>
                    <GradientStop Offset="0.1" Color="Azure"></GradientStop>
                    <GradientStop Offset="0.4" Color="White"></GradientStop>
                    <GradientStop Offset="1" Color="White"></GradientStop>
                </LinearGradientBrush>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="2*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Rectangle Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Stroke="Black" StrokeThickness="1" Fill="Navy"></Rectangle>
            <!--<Rectangle Stroke="Black" StrokeThickness="1" RadiusX="10" RadiusY="10" Margin="5" Grid.Row="1" Grid.Column="0"></Rectangle>-->
           <!--<Rectangle Stroke="Black" StrokeThickness="1" RadiusX="10" RadiusY="10" Margin="5" Grid.Row="2" Grid.Column="0"></Rectangle> -->
            <!--<Rectangle Stroke="Black" StrokeThickness="1" RadiusX="10" RadiusY="10" Margin="5" Grid.Row="3" Grid.Column="0"></Rectangle>-->
            <!--<Rectangle Grid.Column="1" Grid.Row="1" Grid.RowSpan="3" Stroke="Black" StrokeThickness="1" RadiusX="20" RadiusY="20" Margin="5"></Rectangle>-->

            <GroupBox Grid.Row="1" Header="Users"  Name="userGroup" BorderThickness="2" BorderBrush="Black">
                <ListBox Name="topBox" Grid.Row="1" Grid.Column="0" BorderThickness="0"
                     ItemsSource="{Binding Path=User}"
                     ItemTemplate="{StaticResource ResourceKey=UserItemTemplate}"
                     SelectedIndex="0"
                     SelectionChanged="topBox_SelectionChanged"
                     >
                </ListBox>
            </GroupBox>

            <GroupBox Grid.Row="2" Header="Calendars" Name="calendarGroup" BorderThickness="2" BorderBrush="Black">
                <ListBox Name="calendarListBox" Grid.Row="2" Grid.Column="0" BorderThickness="0">
                </ListBox>
            </GroupBox>
            
            <GroupBox Grid.Row="3" Header="Not used"  Name="notUsedGroup" BorderThickness="2" BorderBrush="Black">
                <TextBox Name="lowerBox" Grid.Row="3" Grid.Column="0" BorderThickness="0"></TextBox>
            </GroupBox>
            
            <GroupBox Grid.Row="1" Grid.Column="1" Grid.RowSpan="3"  Header="Calendar entries" Name="calendarEntriesGroup" BorderThickness="2" BorderBrush="Black">
                
            </GroupBox>
            
        </Grid>
      
    </DockPanel>
</Window>
